//
//  WebSocketHelper.swift
//  Mahjong
//
//  Created by 饶首建 on 17/5/24.
//  Copyright © 2017年 com.ikamobile.com. All rights reserved.
//

import Foundation

import SocketIO

public class WebSocketHelper:NSObject{

    public func test() {
        let socket = SocketIOClient(socketURL: URL(string: "http://app.ikamobile.cn:3000")!, config: [.log(true), .forcePolling(true)])
        
        socket.on(clientEvent: .connect) {data, ack in
            print("socket connected")
        }
        
        socket.on("game"){data,ack in
            print("game--->>",data)
        }
        
        socket.connect()
        
    }

}
